package ch3;

/**
 * Created by 竹韵澜 on 2017/7/16.
 */

public class StringTest {
    public static void main(String [] args){
        // test constructor
        String s1 = "java";
        String s2 = "java";
        System.out.println(s1 == s2);
        String s3 = new String("Java");
        String s4 = new String("Java");
        System.out.println(s3 == s4);

        // test format
        String firstName = "Jonh";
        String lastName = "Adams";
        System.out.format("First Name:%s. Last Name: %s %n", firstName, lastName);
    }
}
